package com.king.springcloud.service.impl;

import com.king.springcloud.dao.PaymentDao;
import com.king.springcloud.entities.PaymentEntity;
import com.king.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 支付
 * @author king
 * @data 2020/7/29 13:52
 */
@Service
public class PaymentServiceImpl implements PaymentService {

    @Resource
    private PaymentDao paymentDao;

    /**
     * 新增
     * @param paymentEntity 支付实体类
     * @return 结果
     */
    @Override
    public int create(PaymentEntity paymentEntity) {
        return paymentDao.create(paymentEntity);
    }

    /**
     * 查询
     * @param id 流水号
     * @return 结果
     */
    @Override
    public PaymentEntity getPaymentById(Long id) {
        return paymentDao.getPaymentById(id);
    }
}
